﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true" CodeFile="Vacxin.aspx.cs" Inherits="Admin_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script type="text/javascript">
        $(document).ready(function () {
            activeMenu(2, 0);
        });
    </script>
    <div class="divsize">
        <fieldset>
            <legend>Vac Xin</legend>
            <asp:Label ID="messageKetQua" runat="server" Enabled="False"></asp:Label>
            <%-- // panel hiển thị Vac-xin--%>
            <asp:Panel ID="panelVacxin" runat="server">
                <ol class="form form-clear">
                    <li>
                        <label>Mã vac-xin</label>
                        <asp:TextBox ID="txtMVX" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Tên vac-xin</label>
                        <asp:TextBox ID="txtTVX" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Số Lượng</label>
                        <asp:TextBox ID="txtSL" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Dơn giá</label>
                        <asp:TextBox ID="txtDG" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Ghi chú</label>
                        <asp:TextBox TextMode="MultiLine" Width="375px" Height="135px" ID="txtGC" runat="server"></asp:TextBox>
                        
                    </li>                    
                    <li>
                        <label></label>
                        <asp:Button ID="btnThem" runat="server" CssClass="btn primary" Text="Thêm mới" OnClick="btnThem_Click1" />
                        <asp:Button ID="btnSua" Enabled="false" runat="server" CssClass="btn primary" Text="Sửa thông tin" OnClick="btnSua_Click1" />
                    </li>
                </ol>
            </asp:Panel>
        </fieldset>
    </div>
    <div>
        <fieldset>
            <legend>Danh sách</legend>
            <asp:ListView ID="ListViewVacxin" runat="server" 
                OnItemCommand="ListViewVacxin_OnItemCommand"
                OnItemDeleting="ListViewVacxin_OnItemDeleting" 
                OnItemUpdating="ListViewVacxin_OnItemUpdating">
                <LayoutTemplate>
                    <table border="1">
                        <tr>
                            <th>Mã Vacxin</th>
                            <th style="width:200px">Tên Vacxin</th>
                            <th>Số lượng</th>
                            <th>Đơn giá</th>
                            <th>Ghi chú</th>
                            <th style="width:120px" >Thao tác</th>
                        </tr>
                        <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                    </table>
                    <asp:DataPager ID="ContactsDataPager" runat="server" PageSize="10">
                        <Fields>
                            <asp:NextPreviousPagerField ButtonType="Button"
                                ShowFirstPageButton="true"
                                ShowNextPageButton="false"
                                ShowPreviousPageButton="false" />
                            <asp:NumericPagerField ButtonCount="10" />
                            <asp:NextPreviousPagerField ButtonType="Button"
                                ShowLastPageButton="true"
                                ShowNextPageButton="false"
                                ShowPreviousPageButton="false" />
                        </Fields>
                    </asp:DataPager>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td><%# Eval("MaVC") %></td>
                        <td><%# Eval("TenVC") %></td>
                        <td><%# Eval("SoLuong") %></td>
                        <td><%# Eval("DonGia") %></td>
                        <td><%# Eval("GhiChu") %></td>
                        <td >
                            <asp:LinkButton ID="LinkButtonSua" 
                                ToolTip="Sửa thông tin" 
                                runat="server" 
                                CommandArgument='<%# Eval("MaVC") %>'
                                CommandName="Update">Sửa</asp:LinkButton>
                            |
                            <asp:LinkButton ID="LinkButtonXoa" 
                                ToolTip="Xóa một bản ghi" 
                                runat="server" 
                                CommandArgument='<%# Eval("MaVC") %>'
                                CommandName="Delete" 
                                ForeColor="Brown" 
                                OnClientClick="return confirm('Bạn chắc chắn muốn xóa ?')">Xóa</asp:LinkButton>
                            <%--|--%> 
                           <%-- <a href='ChiTietVacxin.aspx?id=<%# Eval("MaVC") %>'>Chi tiết</a>--%>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
        </fieldset>
    </div>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <ul class="m-melanin-vertical-navigation">
         <li>
                <span class=" ss_sprite ss_shield">&nbsp;</span>
                <a id="A4" href="Vacxin.aspx" class="m-melanin-vertical-navigation-link">Vac-xin</a>
          </li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" runat="Server">
    <asp:Button ID="button_create_Vacxin" runat="server" CssClass="btn small primary" Text="Thêm Vac-xin" />
</asp:Content>
